﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="GroupList.aspx.cs" Inherits="Contacts.Web.GroupList" %>
<%@ Register Assembly="Contacts.Web" Namespace="Contacts.Web" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

<h2 class="h2Style">Groups<asp:Label ID="lblWarning" ForeColor="Red" runat="server" Text=""></asp:Label></h2>

        	<div id="formSection">
        		<div id="offerForm">

    <table class="centerTable">

      <tr>
       <td>
           <cc1:GridView ID="groupsView" runat="server" AutoGenerateColumns="False" 
               DataKeyNames="GroupID,Icon" onrowcommand="groupsView_OnRowCommand" 
              CellPadding="4" EnableModelValidation="True" ForeColor="#333333" 
              GridLines="None" Width="100%" EnableNextPrevNumericPager="true" 
              onpageindexchanging="groupsView_PageIndexChanging" PageSize="2" >
              <AlternatingRowStyle BackColor="White" ForeColor="#5D7B9D" />
              <Columns>
              <asp:BoundField DataField="GroupID" HeaderText="ID" Visible="false" />
              <asp:BoundField DataField="GroupName" HeaderText="Группа" 
                    HeaderStyle-Width="130px" >
<HeaderStyle Width="130px"></HeaderStyle>
                 </asp:BoundField>
              <asp:BoundField DataField="Description" HeaderText="Описание" HtmlEncode="false" />
              <asp:ImageField DataImageUrlFormatString="GetImage.aspx?file={0}" 
                    DataImageUrlField="Icon" HeaderText="Иконка" ControlStyle-Height="60px" 
                    ControlStyle-Width="60px" >
<ControlStyle Height="60px" Width="60px"></ControlStyle>
                 </asp:ImageField>
              <asp:TemplateField HeaderStyle-Width="20px">
               <ItemTemplate>
                  <asp:LinkButton ID="btnEdit" runat="server" Text="Edit" CommandName="EditCmd"  CommandArgument='<%# Eval("GroupID").ToString() + "|" + Eval("Icon").ToString() %>' />
                  <asp:LinkButton ID="btnDelete" runat="server" Text="Delete" CommandName="DeleteCmd" CommandArgument='<%# Eval("GroupID").ToString() + "|" + Eval("Icon").ToString() %>' />
               </ItemTemplate>

<HeaderStyle Width="20px"></HeaderStyle>
              </asp:TemplateField>
              </Columns>
               <EditRowStyle BackColor="#999999" />
              <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
              <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
              <PagerStyle BackColor="LightGray" ForeColor="White" HorizontalAlign="Center" />
               <RowStyle Wrap="True" BackColor="#F7F6F3" ForeColor="#333333" />
               <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
           </cc1:GridView>
       </td>
      </tr>
    </table>

      <div class="centerObj">
         <p><a href="GroupEditor.aspx" title="Add" class="button">Add</a></p>
      </div>
				</div>
        	</div><!-- end #formSection -->


</asp:Content>
